#include<stdio.h>
#include<stdlib.h>
#include<math.h>

using namespace std;
double fact(int n){
    if(n==0||n==1)
        return 1L;
    return n*fact(n-1);
}
double fabs(double x){
    if(x<=1e-6)
        return x;
    else    
        return x*(-1);
}
double sin(double x)
{
	double sum=0;
	double tmp=x;//首项值
	int n=1;
	while(fabs(tmp)>=1e-5)
	{
		sum=sum+tmp;
		tmp=(-1)*tmp*x*x/(n+1)/(n+2);
		n=n+2;
	}
    printf("%.3lf",sum);
	return sum;
}
int main(){
    sin(1.57);
    return 0;
}